# 编写任务
from django.conf import settings
from ronglian_sms_sdk import SmsSDK
from celery_tasks.main import app
# 起别名
@app.task(name='sms_send')
def sms_send(mobile, send_data):
    sms = SmsSDK(settings.ACCID, settings.ACCTOKEN, settings.APPID)
    sms.sendMessage('1', mobile, send_data)